package com.guigu.lqxm.yy.controller;


import com.guigu.lqxm.pojo.Test;


import com.guigu.lqxm.yy.service.impl.Yyserviceimpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/cha")
public class YyController {
    @Autowired(required = false)
    Yyserviceimpl yyservice;
    @GetMapping(value = "{id}")
    @ResponseBody
    public Test chaxx(@PathVariable("id") Integer id){
        Test chaxx = yyservice.cha(id);
        return chaxx;


    }
    @PostMapping("/xg")
    @ResponseBody
    public int xiugai(@RequestBody Test test){
        int xiugai = yyservice.xiugai(test);
        return xiugai;
    }
}
